//
//  HHTabBarController.m
//  git-osc
//
//  Created by hjl on 16/3/20.
//  Copyright © 2016年 hjl. All rights reserved.
//

#import "HHTabBarController.h"
#import "HHMeViewController.h"
#import "HHProjectViewController.h"
#import "HHDiscoverViewController.h"
#import "HHNavigationController.h"

@interface HHTabBarController ()

@end

@implementation HHTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    HHProjectViewController *project = [[HHProjectViewController alloc]init];
    // project.view.backgroundColor = [UIColor redColor];
    HHNavigationController *navp = [[HHNavigationController alloc]initWithRootViewController:project];
    project.title = @"项目";
    project.tabBarItem.image = [UIImage imageNamed:@"projects"];
    project.tabBarItem.selectedImage = [UIImage imageNamed:@"projects_selected"];
    [self addChildViewController:navp];
    
    
    HHDiscoverViewController *discover = [[HHDiscoverViewController alloc]init];
    // discover.view.backgroundColor = [UIColor orangeColor];
    HHNavigationController *navd = [[HHNavigationController alloc]initWithRootViewController:discover];
    discover.title = @"发现";
    discover.tabBarItem.image = [UIImage imageNamed:@"discover"];
    discover.tabBarItem.selectedImage = [UIImage imageNamed:@"discover_selected"];
    [self addChildViewController:navd];
    
    HHMeViewController *me = [[HHMeViewController alloc]init];
    // me.view.backgroundColor = [UIColor grayColor];
    HHNavigationController *navm = [[HHNavigationController alloc]initWithRootViewController:me];
    me.title = @"我的";
    me.tabBarItem.image = [UIImage imageNamed:@"mine"];
    me.tabBarItem.selectedImage = [UIImage imageNamed:@"mine_selected"];

    [self addChildViewController:navm];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}




/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
